<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>gra.html</title>
<script>
window.onload=function(){
	var ctx= document.getElementById('canvas').getContext('2d');
	var gra=ctx.createRadialGradient(400,300,50,400,300,150);
	
	gra.addColorStop(0,'red');
	gra.addColorStop(1,'blue');
	gra
	 
	ctx.fillStyle=gra;
	ctx.fillRect(10,10,400,300);

}
</script>


</head>
<body>
<canvas id='canvas' width='800' height='600'></canvas>
</body>
</html>